package com.jiyun.controller;

import com.jiyun.pojo.entity.Tongji;
import com.jiyun.service.TongjiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("tongji")
public class TongjiController {

    @Autowired
    private TongjiService tongjiService;

//柱状图
    @RequestMapping("TongjiUserAndPaoTui")
    public List<Tongji> TongjiUserAndPaoTui(){
        List<Tongji> list=tongjiService.TongjiUserAndPaoTui();
        System.out.println("-----------------------list="+list);
        return list;
    }

//    饼形图
    @RequestMapping("TongjiStatusCount")
    public List<Tongji> TongjiStatusCount(){
        return tongjiService.TongjiStatusCount();
    }


}
